# -*- ecoding: utf-8 -*-
# @Author: Wick
# @Time: 2024-02-23 18:16


#使用位运算，来得到整数对应的二进制中有多少个1

check_falg = 1
num = int(input("请输入一个数："))
count = 0
i = 1
while i <= 64:
    if check_falg&num:
        count += 1
    check_falg = check_falg<<1
    i += 1

print(count)